package com.solution.model;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * UserRolePermissionId
 */
@Embeddable
public class UserRolePermissionId  implements java.io.Serializable
 {

	
	private static final long serialVersionUID = 1L;
	
    private Long userRoleTypeId;
    private Long userPermissionTypeId;


    @Column(name="User_Role_TypeID", nullable=false, precision=10, scale=0)
    public Long getUserRoleTypeId() {
        return this.userRoleTypeId;
    }
    
    public void setUserRoleTypeId(Long userRoleTypeId) {
        this.userRoleTypeId = userRoleTypeId;
    }

    @Column(name="User_Permission_TypeID", nullable=false, precision=10, scale=0)
    public Long getUserPermissionTypeId() {
        return this.userPermissionTypeId;
    }
    
    public void setUserPermissionTypeId(Long userPermissionTypeId) {
        this.userPermissionTypeId = userPermissionTypeId;
    }


   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof UserRolePermissionId) ) return false;
		 UserRolePermissionId castOther = ( UserRolePermissionId ) other; 
         
		 return ( (this.getUserRoleTypeId()==castOther.getUserRoleTypeId()) || ( this.getUserRoleTypeId()!=null && castOther.getUserRoleTypeId()!=null && this.getUserRoleTypeId().equals(castOther.getUserRoleTypeId()) ) )
 && ( (this.getUserPermissionTypeId()==castOther.getUserPermissionTypeId()) || ( this.getUserPermissionTypeId()!=null && castOther.getUserPermissionTypeId()!=null && this.getUserPermissionTypeId().equals(castOther.getUserPermissionTypeId()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getUserRoleTypeId() == null ? 0 : this.getUserRoleTypeId().hashCode() );
         result = 37 * result + ( getUserPermissionTypeId() == null ? 0 : this.getUserPermissionTypeId().hashCode() );
         return result;
   }   


}


